﻿using LockerRack.Drawers;
using Primitive.Mvvm.Framework.Implementations;
using Primitive.Mvvm.Framework.Interfaces;
using UIController.Models;

namespace UIController.ViewModels
{
    public class RightDetailViewModel : BaseViewModel
    {
        private ToDoModel _model;

        public RightDetailViewModel(IModel model, IMediator mediator) : base(mediator)
        {
            _model = model as ToDoModel;
        }

        public IModel Model
        {
            get { return _model; }
        }

        public Drawer SelectedDrawer
        {
            get { return _model.SelectedDrawer; }
            set
            {
                if (_model.SelectedDrawer != value)
                {
                    _model.SelectedDrawer = value;
                    RaisePropertyChanged(this, () => SelectedDrawer);
                }
            }
        }
    }
}
